<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/include/taglibs.jsp"%>
<script type="text/javascript">

$(document).ready(function(){
	<c:if test="${param.returnCd=='0000' }">alert('수정했습니다');</c:if>	
});

//데이터 저장
function submitData(){
	if($("#p_logo").val()!=''){
		
		$("#del_p_logo").attr("checked",true);
	}
	if($("#footer_logo").val()!=''){
		$("#del_footer_logo").attr("checked",true);
	}
	alert($("#frmData").attr("method"));
	$("#frmData").submit();
}

//순서변경
function changeOrder(idx, ord){
	
// 	<input id="pr_no${status.index }" value="${map.pr_no }" type="hidden"/>
// 	<input id="room_ord${status.index }" value="${map.room_ord }" type="hidden"/>
	var sum = Number(idx)+Number(ord);
// 	alert("pr_no : "+$("#pr_no"+idx).val()+", room_ord : "+$("#room_ord"+idx).val()+", ch_pr_no : "+$("#pr_no"+sum).val()+", room_ord : "+$("#room_ord"+sum).val());
	location.href="./peti503T.do?p_id=${map.p_id}&pr_no="+$("#pr_no"+idx).val()+"&room_ord="+$("#room_ord"+sum).val()+"&ch_pr_no="+$("#pr_no"+sum).val()+"&ch_room_ord="+$("#room_ord"+idx).val();
}
</script>
<%@ include file="/WEB-INF/jsp/pmgr/pe/ti/page_top.jsp"%>


<table width="700" >
<tr>
	<td align="left">객실목록</td>
	<td align="right"><b><a href="./peti501Q.do?p_id=${param.p_id }">[객실등록]</a></b></td>
</tr>
</table>
<table width="700" border="0"  cellspacing="1" cellpadding="2" CLASS="class_admin_table">
<tr height="25" class="class_admin_table_head">
	<td align="center" width="120">객실명</td>
	<td align="center" width="100">객실구분</td>
	<td align="center">기본인원</td>
	<td align="center">최대인원</td>
	<td align="center">면적</td>
	<td align="center">객실형태</td>
<!-- 	<td align="center">금액</td> -->
	<td align="center">순서</td>
</tr>
<c:if test="${list !=null && fn:length(list)>0 }">
	<c:forEach var="map" items="${list}" varStatus="status">
<tr height="25" class="class_admin_table_blank">
	<td align="center"><a href="./peti502Q.do?p_id=${param.p_id }&pr_no=${map.pr_no}">
	<input id="pr_no${status.index }" value="${map.pr_no }" type="hidden"/>
	<input id="room_ord${status.index }" value="${map.room_ord }" type="hidden"/>
	<input name="" value="" type="hidden"/>
		<c:if test="${map.room_type=='F' }"><img src="/usr/images/res_icon_family.gif" width="10" height="10" border="0" align="absmiddle">	</c:if>
		<c:if test="${map.room_type=='C' }"><img src="/usr/images/res_icon_couple.gif" width="10" height="10" border="0" align="absmiddle">	</c:if>
		<c:if test="${map.room_type=='B' }"><img src="/usr/images/res_icon_big.gif" width="10" height="10" border="0" align="absmiddle">	</c:if>
	
	${map.room_nm }</a></td>
	<td align="center">
		<c:if test="${map.room_type=='F' }">가족룸</c:if>
		<c:if test="${map.room_type=='C' }">커플룸</c:if>
		<c:if test="${map.room_type=='B' }">단체룸</c:if>
	</td>
	<td align="center">${map.use_man_cnt }</td>
	<td align="center">${map.use_max_cnt }</td>
	<td align="center">${map.area_p }평/${map.area_m }㎡</td>
	<td align="center">${map.room_form }</td>
<%-- 	<td align="center">${map.busy_1_base },000</td> --%>
	<td align="center">
		<c:if test="${status.index!=0 }">
		<a href="#" onclick="changeOrder('${status.index }',-1);">위로</a>
		</c:if>
		<c:if test="${fn:length(list)!=status.count }">
		<a href="#" onclick="changeOrder('${status.index }',1);">아래로</a>
		</c:if>
		
		
	</td>
</tr>
	</c:forEach>
</c:if>

</table>


<table width="700" border="0"  cellspacing="1" cellpadding="2" CLASS="class_admin_table_nocolor">
<tr> 
	<td height="25"  align="center">
	<INPUT TYPE="button" onclick="location.href='./peti100Q.do'" value=" 펜 션 목 록 "> 
	</td>
</tr>
</table>	

